package fr.utbm.gi.vi51.slizers.pw.agent.action;

import org.janusproject.kernel.address.AgentAddress;

import fr.utbm.gi.vi51.slizers.framework.agent.AbstractSituatedObject;
import fr.utbm.gi.vi51.slizers.framework.environment.Influence;

/**
 * Represents the influence resulting from an action taking by the creature
 */
public class CreatureActionInfluence extends Influence< AbstractSituatedObject > {

	/**
	 * Represents the action influence
	 */
	private CreatureAction basicAction;
	
	public CreatureActionInfluence(AgentAddress _emitter) {
		super(_emitter);
	}
	
	public CreatureActionInfluence(AgentAddress _emitter, CreatureAction _action) {
		super(_emitter);
		this.basicAction = _action;
	}
	
	/**
	 * Returns an integer representing the data.
	 * @return an integer representing the data.
	 */
	public int toInt() {
		return basicAction.ordinal();
	}

	/**
	 * @return the basicAction
	 */
	public CreatureAction getAction() {
		return basicAction;
	}

	/**
	 * @param basicAction the basicAction to set
	 */
	public void setBasicAction(CreatureAction basicAction) {
		this.basicAction = basicAction;
	}
}
